home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / TUTORIAL.BIN / LongVarChar.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-01-30  |  2.5 KB  |  72 lines

  1. package symantec.itools.db.net;
  2.  
  3. import java.io.DataInputStream;
  4. import java.io.DataOutputStream;
  5. import java.io.IOException;
  6. import java.io.InputStream;
  7. import symjava.sql.SQLException;
  8.  
  9. public class LongVarChar extends CharField {
  10.    LongVarChar() {
  11.    }
  12.  
  13.    int getType() {
  14.       return 74;
  15.    }
  16.  
  17.    void write(DataOutputStream out) throws IOException {
  18.       super.write(out);
  19.       EOT eot = new EOT();
  20.       eot.write(out);
  21.    }
  22.  
  23.    void read(DataInputStream in) throws SQLException, IOException, ErrorException {
  24.       super.read(in);
  25.       ServerObject obj = (ServerObject)NetClass.getNextObject(in);
  26.       if (obj.getType() != 50) {
  27.          ((ServerObject)this).onObjectError(obj);
  28.       }
  29.  
  30.    }
  31.  
  32.    boolean storesData() {
  33.       return false;
  34.    }
  35.  
  36.    public InputStream getAsciiStream() throws SQLException {
  37.       throw new SQLException("Can't convert data to requested format");
  38.    }
  39.  
  40.    public InputStream getUnicodeStream() throws SQLException {
  41.       throw new SQLException("Can't convert data to requested format");
  42.    }
  43.  
  44.    public InputStream getBinaryStream() throws SQLException {
  45.       throw new SQLException("Can't convert data to requested format");
  46.    }
  47.  
  48.    public void setAsciiStream(InputStream x, int length) throws SQLException {
  49.       throw new SQLException("Can't convert data to requested format");
  50.    }
  51.  
  52.    public void setUnicodeStream(InputStream x, int length) throws SQLException {
  53.       throw new SQLException("Can't convert data to requested format");
  54.    }
  55.  
  56.    public void setBinaryStream(InputStream x, int length) throws SQLException {
  57.       throw new SQLException("Can't convert data to requested format");
  58.    }
  59.  
  60.    public int getSQLType() {
  61.       return -1;
  62.    }
  63.  
  64.    public Object getObject() throws SQLException {
  65.       throw new SQLException("Can't convert data to requested format");
  66.    }
  67.  
  68.    public void setObject(Object obj) throws SQLException {
  69.       throw new SQLException("Can't convert data to requested format");
  70.    }
  71. }
  72.